<?php
    if (!defined('EXPONENT')) exit('');
    global $user;
    global $db;
    $temp=serialize($loc);
    $new_video=$db->selectObjects("videomodule_video","location_data = '{$temp}' ORDER BY postdate DESC LIMIT 0, 4");
    $new_video=videomodule::__VideoProcess($new_video);

    // fetch to template
    $template=new template("videomodule","New_homepagevideo",$loc);
    $template->register_permissions(array('administrate',"configure", "create", "edit", "delete"),$loc);
    $template->assign('loc', $loc);
    $template->assign("cats", $cats);
    // for playlist in bottom
    $template->assign("new_video", $new_video);
    $template->assign("new_video_count", count($new_video));

    $template->output();
?>
